package com.voicechat.firstmet.net.service;

import android.util.Log;

import com.voicechat.firstmet.bean.AlipayBean;
import com.voicechat.firstmet.bean.CoummunityNotice;
import com.voicechat.firstmet.bean.Result;
import com.voicechat.firstmet.net.Params;

import rx.Observable;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.net.service
 * @ClassName: AlipaySerivice
 * @Description: java类作用描述
 * @Author: ljp
 * @CreateDate: 2019/1/8 14:01
 * @Version: 1.0
 */
public class AlipaySerivice extends BasePayService {
    /**
     * @return
     * @method
     * @description 支付宝充值金币订单号请求
     * @date: 2018/9/17 19:24
     * @author: ljp
     */
    public static Observable<AlipayBean> alipayRecharge(String rechargeNumber, String rechargeId) {
        Params params = new Params();
      //  params.put("token", token);
       // params.put("equipmentId", equipmentId);
        params.put("rechargeNumber", rechargeNumber);
        params.put("rechargeId", rechargeId);//充值金额，（金额,金币）
        Log.i("LoginService",  params.toString());
        return sNetInterface.alipayRecharge(params).compose(applySchedulers());
    }
    /**
     * @return
     * @method
     * @description 微信充值金币订单号请求
     * @date: 2018/9/17 19:24
     * @author: ljp
     */
    public static Observable<AlipayBean> weixinRecharge(String rechargeNumber, String rechargeId) {
        Params params = new Params();
        //  params.put("token", token);
        // params.put("equipmentId", equipmentId);
        params.put("rechargeNumber", rechargeNumber);
        params.put("rechargeId", rechargeId);//充值金额，（金额,金币）
        Log.i("LoginService",  params.toString());
        return sNetInterface.weixinRecharge(params).compose(applySchedulers());
    }
    /**
     * @return
     * @method
     * @description 支付宝充值金币充值结果判断
     * @date: 2018/9/17 19:24
     * @author: ljp
     */
    public static Observable<Result> judeAlipayRecharge(String orderString) {
        Params params = new Params();
        //  params.put("token", token);
        // params.put("equipmentId", equipmentId);
        params.put("orderString", orderString);
        Log.i("LoginService",  params.toString());
        return sNetInterface.judeAlipayRecharge(params).compose(applySchedulers());
    }
    /**
     * @return
     * @method
     * @description 支付宝充值会员订单号请求
     * @date: 2018/9/17 19:24
     * @author: ljp
     */
    public static Observable<AlipayBean> alipayRechargeVIP(String rechargeNumber, String rechargeId) {
        Params params = new Params();
        //  params.put("token", token);
        // params.put("equipmentId", equipmentId);
        params.put("rechargeNumber", rechargeNumber);
        params.put("rechargeId", rechargeId);//充值金额，（金额,金币）
        Log.i("LoginService",  params.toString());
        return sNetInterface.alipayVip(params).compose(applySchedulers());
    }
    /**
     * @return
     * @method
     * @description 支付宝充值会员充值结果判断
     * @date: 2018/9/17 19:24
     * @author: ljp
     */
    public static Observable<Result> judeAlipayRechargeVIP(String orderString) {
        Params params = new Params();
        //  params.put("token", token);
        // params.put("equipmentId", equipmentId);
        params.put("orderString", orderString);
        Log.i("LoginService",  params.toString());
        return sNetInterface.judeAlipayRechargeVIP(params).compose(applySchedulers());
    }
}
